-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More on sympy #890
base: split_to_sympy
Are you sure you want to change the base?
More on sympy #890
Conversation
@@ -49,6 +49,8 @@ | |||
RealOne = Real(1.0) | |||
|
|||
|
|||
use_sympy_for_arithmetic = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting this variable to True
we use a eval_Times
and eval_Plus
implementation based on sympy. Notice that it fails to pass several tests.
test/core/test_serialization.py
Outdated
from mathics.session import MathicsSession | ||
|
||
import_and_load_builtins() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to add this line on each test that I want to run individually. Maybe it should be added in mathics.session
.
@@ -402,18 +401,6 @@ def __new__(cls, name: str, sympy_dummy=None): | |||
# For example, this can happen with String constants. | |||
|
|||
self.hash = hash((cls, name)) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dummy symbols are something related to sympy and not with the basic Mathics data structures. It is not needed anymore.
@rocky, this PR completes #888 by rewriting
from_sympy
in the form of a dispatch table instead of a very longif/elif
routine. Also, I tried to implement a way to avoid the conversions back-and-forth.Finally, I included some code to implement
eval_Plus
andeval_Times
fully based on Sympy.